Skip to content

docs(atlas): source-mark grammar spec for composite provenance marks (#6044) - #7629

Merged
dezren39 merged 3 commits into
mainfrom
queue/12891-6044-source-mark-grammar
Nov 12, 2026
Merged

dezren39 merged 3 commits into
mainfrom
queue/12891-6044-source-mark-grammar

Conversation

@dezren39

@dezren39 dezren39 commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Design record for #6044 — the source-mark grammar the #6029 existing-embed audit consumes, written against the #3125 provenance-registry shape.

Deliverable: doc/2026-11-08T10-17-00Z_design_source_mark_grammar/

  • Grammar (EBNF): two productions — repo@<revision>:<path>[#<hash>] and <system>@<host>@<captured-at>[:<locator>][#<hash>], of which system@… and chat@… are instances and the general (system, host, locator, captured-at, content-hash) fallback is the same production with every part present. Content hash rides in the mark as a #sha256:<64 hex> fragment.
  • Formatter/parser contract: exactly one pair, canonical-only parse, total and deterministic format, byte-identical round-trip, enumerated errors (one per rule).
  • Validation rules V1–V9: parseability, full commit ids and relative POSIX paths, token/Cc-Cf hygiene (Design: a value cannot act on the terminal — one format-character (Cf) contract for pkgs/id plain output #3455), RFC 3339 UTC timestamps, sha256 in a closed v1 set, span ranges, hash verification against stored content, complete registry tuple, round-trip property.
  • Registry mapping: every part maps to atlas: provenance registry (chunk occurrences), content-addressed extracts, multi-DB vector resolution #3125's chunk_occurrences tuple; captured-at and observed_at are distinct; every occurrence carries a verifying hash.
  • Rejected alternatives: regex-per-source, free prose, URI scheme, embedded JSON, per-field marks, abbreviated SHAs, hash-outside-the-mark.

Names #6029 as the consumer this un-parks. Design only — implementation of the formatter/parser is a follow-on task.

Refs #6044, #6018, #3125, #6029.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Closes #6044.

Summary by CodeRabbit

  • Documentation
    • Added a design record describing source-mark formats, parsing and formatting rules, validation checks, and registry mapping.
    • Documented audit flow, implementation constraints, and decisions on open questions.

@dezren39
dezren39 requested a review from a team as a code owner November 8, 2026 10:14
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request adds a v1 design record for source marks. It defines repository and host mark forms, parser and formatter behavior, validation rules, registry mappings, and audit flow. It does not add a parser or formatter implementation.

Changes: Source-mark grammar

Layer / File(s) Summary
Grammar and validation contract
doc/2026-11-08T10-17-00Z_design_source_mark_grammar/2026-11-08T10-17-00Z_design_source_mark_grammar.md
The design record defines repository and host mark syntax, canonical parsing and formatting, validation outcomes, mappings to registry fields, and the planned audit flow. It also records invariants, rejected alternatives, and defaults for open questions.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related issues

  • developing-today/code#8060 — The design specifies captured-at handling for repository marks, which relates to the issue’s reported mark collisions.
  • developing-today/code#6029 — The design defines parsing and validation rules for the existing-embed audit; the audit itself is not performed here.
  • developing-today/code#6018 — The design contributes a source-mark grammar to the provenance standard tracked by this parent issue.
Merge Risk: Moderate · up to bd417

This change only adds a design document for source-mark grammar, so production behavior is unaffected. The grammar has a circular definition and cannot represent some valid repository paths, and several rules contradict each other. These gaps should be fixed before the record is used as the implementation contract.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T15:51:51.679554Z bd417f2 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aac41eefd4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dezren39
dezren39 merged commit 0f0a2ce into main Nov 12, 2026
11 of 18 checks passed
@dezren39
dezren39 deleted the queue/12891-6044-source-mark-grammar branch November 12, 2026 15:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd417f29f9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

host-mark = system "@" host "@" captured-at ( ":" locator )? hash? ;

revision = 40 hex | 64 hex ; (* full git/object id; no abbreviations *)
path = locator ; (* relative POSIX path, see V2 *)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Define the path production independently of locator

path = locator and the reverse reference in locator = ( path | … | opaque ) create a recursive cycle that consumes no input. An ordinary path such as pkgs/id/src/store.rs therefore has infinitely many derivations through repeated path → locator → path expansions, contradicting §4's exactly-one-parse contract; a straightforward recursive-descent implementation would recurse indefinitely. Define the path syntax independently before referencing it from locator.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

design(atlas): source-mark grammar — one parser + one formatter for composite provenance marks

1 participant